package com.atguigu.gulimail.auth.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

@Data
public class RegistVo {

    @NotEmpty(message = "用户名必须填写")
    @Length(min = 8,max = 16,message = "用户名长度为8-16位")
    private String userName;
    @NotEmpty(message = "密码必须填写")
    @Length(min = 6,max = 9,message = "密码长度为6-9位")
    private String password;
    @NotEmpty(message = "手机号必须填写")
    @Pattern(regexp = "^1([3-9])[0-9]{9}$")
    private String phone;
    @NotEmpty(message = "验证码必须填写")
    private String code;

}
